package com.konsung.ksdc.bean.netbean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 订单信息bean
 * Created by DLX on 2016/5/27 0027.
 */
public class OrderItemNetBean implements Parcelable {
    /**
     * 订单编码
     */
    private String orderId;

    /**
     * 订单状态(1:"待发货"、2:"待收货" 3:"待评价"、4:"交易成功"、5:"已关闭")
     */
    private String status;

    /**
     * 订单创建时间
     */
    private String createTime;

    /**
     * 订单总价
     */
    private String totalPrice;

    /**
     * 订单取消原因
     */
    private String cancleReason;

    /**
     * 订单产品关系列表
     */
    private List<OrderProductNetBean> confs;

    /**
     * 收货地址
     */
    private AddrInfoNetBean address;

    /**
     * 发货信息 快递单号类别(1、正常,2、换货3、买家换货寄回,4、买家退货寄回)
     */
    private List<ExpressDetailNetBean> shipments;

    /**
     * 确认收货时间
     */
    private String receiptTime;

    /**
     * 订单关闭时间
     */
    private String closeTime;

    /**
     * 商品描述星级（1、 2 、 3 、 4 、 5）
     */
    private String evaluateLevel;

    /**
     * 商品评价服务星级（1、 2 、 3 、 4 、 5）
     */
    private String serverLevel;

    /**
     * 订单发货地址
     */
    private ExpressDetailNetBean asdd;

    private String evaluateTime; // 订单评价时间

    /**
     * 获取订单号
     * @return 订单号
     */
    public String getOrderId() {
        return orderId;
    }

    /**
     * 设置订单号
     * @param orderId 订单号
     */
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    /**
     * 获取订单状态
     * @return 订单状态
     */
    public String getStatus() {
        return status;
    }

    /**
     * 设置订单状态
     * @param status 订单状态
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 获取下单时间
     * @return 下单时间
     */
    public String getCreateTime() {
        return createTime;
    }

    /**
     * 设置下单时间
     * @param createTime 下单时间
     */
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取订单商品总价
     * @return 订单商品总价
     */
    public String getTotalPrice() {
        return totalPrice;
    }

    /**
     * 设置订单商品总价
     * @param totalPrice 订单商品总价
     */
    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }

    /**
     * 获取订单取消原因
     * @return 订单取消原因
     */
    public String getCancleReason() {
        return cancleReason;
    }

    /**
     * 设置订单取消原因
     * @param cancleReason 订单取消原因
     */
    public void setCancleReason(String cancleReason) {
        this.cancleReason = cancleReason;
    }

    /**
     * 获取订单商品信息集合
     * @return 订单商品信息集合
     */
    public List<OrderProductNetBean> getConfs() {
        return confs;
    }

    /**
     * 设置订单商品信息集合
     * @param confs 订单商品信息集合
     */
    public void setConfs(List<OrderProductNetBean> confs) {
        this.confs = confs;
    }

    /**
     * 获取收货地址信息
     * @return 收货地址信息
     */
    public AddrInfoNetBean getAddress() {
        return address;
    }

    /**
     * 设置收货地址信息
     * @param address 收货地址信息
     */
    public void setAddress(AddrInfoNetBean address) {
        this.address = address;
    }

    /**
     * 获取快递信息集合
     * @return 快递信息集合
     */
    public List<ExpressDetailNetBean> getShipments() {
        return shipments;
    }

    /**
     * 设置快递信息集合
     * @param shipments 快递信息集合
     */
    public void setShipments(List<ExpressDetailNetBean> shipments) {
        this.shipments = shipments;
    }

    /**
     * 获取订单评价时间
     * @return 订单评价时间
     */
    public String getEvaluateTime() {
        return evaluateTime;
    }

    /**
     * 设置订单评价时间
     * @param evaluateTime 订单评价时间
     */
    public void setEvaluateTime(String evaluateTime) {
        this.evaluateTime = evaluateTime;
    }

    /**
     * 获取商品评价星级
     * @return 商品评价星级
     */
    public String getEvaluateLevel() {
        return evaluateLevel;
    }

    /**
     * 设置商品评价星级
     * @param evaluateLevel 商品评价星级
     */
    public void setEvaluateLevel(String evaluateLevel) {
        this.evaluateLevel = evaluateLevel;
    }

    /**
     * 获取服务评价星级
     * @return 服务评价星级
     */
    public String getServerLevel() {
        return serverLevel;
    }

    /**
     * 设置服务评价星级
     * @param serverLevel 服务评价星级
     */
    public void setServerLevel(String serverLevel) {
        this.serverLevel = serverLevel;
    }

    /**
     * 获取确认收货时间
     * @return 确认收货时间
     */
    public String getReceiptTime() {
        return receiptTime;
    }

    /**
     * 设置确认收货时间
     * @param receiptTime 确认收货时间
     */
    public void setReceiptTime(String receiptTime) {
        this.receiptTime = receiptTime;
    }

    /**
     * 获取订单关闭时间
     * @return 订单关闭时间
     */
    public String getCloseTime() {
        return closeTime;
    }

    /**
     * 设置订单关闭时间
     * @param closeTime 订单关闭时间
     */
    public void setCloseTime(String closeTime) {
        this.closeTime = closeTime;
    }

    /**
     * 获取发货快递信息
     * @return 发货快递信息
     */
    public ExpressDetailNetBean getAsdd() {
        return asdd;
    }

    /**
     * 设置发货快递信息
     * @param asdd 发货快递信息
     */
    public void setAsdd(ExpressDetailNetBean asdd) {
        this.asdd = asdd;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.orderId);
        dest.writeString(this.status);
        dest.writeString(this.createTime);
        dest.writeString(this.totalPrice);
        dest.writeString(this.cancleReason);
        dest.writeTypedList(this.confs);
        dest.writeParcelable(this.address, flags);
        dest.writeTypedList(this.shipments);
        dest.writeParcelable(this.asdd, flags);
        dest.writeString(this.closeTime);
        dest.writeString(this.receiptTime);
        dest.writeString(this.evaluateLevel);
        dest.writeString(this.serverLevel);
        dest.writeString(this.evaluateTime);
    }

    /**
     * 序列化实体类对象
     * @param in Parcel对象
     */
    protected OrderItemNetBean(Parcel in) {
        this.orderId = in.readString();
        this.status = in.readString();
        this.createTime = in.readString();
        this.totalPrice = in.readString();
        this.cancleReason = in.readString();
        this.confs = in.createTypedArrayList(OrderProductNetBean.CREATOR);
        this.address = in.readParcelable(
                AddrInfoNetBean.class.getClassLoader());
        this.shipments = in.createTypedArrayList(ExpressDetailNetBean.CREATOR);
        this.asdd = in.readParcelable(
                ExpressDetailNetBean.class.getClassLoader());
        this.closeTime = in.readString();
        this.receiptTime = in.readString();
        this.evaluateLevel = in.readString();
        this.serverLevel = in.readString();
        this.evaluateTime = in.readString();
    }

    public static final Creator<OrderItemNetBean> CREATOR =
            new Creator<OrderItemNetBean>() {
                @Override
                public OrderItemNetBean createFromParcel(Parcel source) {
                    return new OrderItemNetBean(source);
                }

                @Override
                public OrderItemNetBean[] newArray(int size) {
                    return new OrderItemNetBean[size];
                }
            };
}
